<?php
/* @var $this RosterController */
/* @var $model Schedule */
 /* <iframe style="border:1px solid gray; height:250px; width:430px"
    src="http://piratepad.net/8OaXDazSYd?fullScreen=1&showChat=false&showLineNumbers=false&showControls=false">
  </iframe>  
*/
?>

<?php 

$team_etherpad = Team::model()->findByPk(Yii::app()->user->team_id)->pad_url;

//echo "etherpad field has $team_etherpad";

if($team_etherpad != null): ?>
	<?php
	$team_etherpad = preg_replace('/\s\s+/', '', $team_etherpad);
	?>
	
	<div style="background:#fff; padding:3px">
	  <iframe style="border:1px solid gray; height:250px; width:500px"
		 src="<?php echo $team_etherpad; ?>?fullScreen=1&showChat=false&showLineNumbers=true&showControls=false">
	  </iframe>
	  <div>
		<a href="<?php echo $team_etherpad; ?>?fullScreen=1">Edit in Fullscreen?</a>
	  </div>
	</div>

<?php 

else: ?>

<center>
<br>
<br>
<br>
<h2> No Etherpad defined for the <?php echo Yii::app()->user->team_name; ?> Team </h2>

For information on how to define an etherpad for you team, please click <a href="#">here</a> !

</center>

<?php endif; ?>
